package com.geekcoding.geekoj.entity;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableName;
import com.geekcoding.geekoj.nums.CorrectType;
import com.geekcoding.geekoj.nums.HardLevel;
import com.geekcoding.geekoj.nums.QuestionType;
import lombok.*;
import lombok.experimental.SuperBuilder;

@EqualsAndHashCode(callSuper = true)
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@TableName("geekoj_question")
public class Question extends BaseEntity{
    private String title;

    private String description;

    @EnumValue
    @Builder.Default
    private QuestionType type = QuestionType.CHOICE;

    private String options;

    private String answer;

    private String creatorId;

    private String subjectId;

    @EnumValue
    private HardLevel hardLevel;

    @EnumValue
    @Builder.Default
    private CorrectType correctType = CorrectType.AUTO;

    /**
     * 题目解析
     */
    private String analysis;

}
